﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DesignPatterns.Strategy
{
    public partial class FrmStrategy : FrmBase
    {
        public FrmStrategy()
        {
            InitializeComponent();

            cmbType.SelectedIndex = 0;

            btnCash.Click += BtnCash_Click;
        }

        private void BtnCash_Click(object sender, EventArgs e)
        {
            var cashCxt = new CashContext(cmbType.Text);
            labRealMoney.Text = cashCxt.GetResult(nudMoney.Value).ToString();
        }
    }
}
